package com.qdlc.p2p.dal.model;

import org.springframework.beans.BeanUtils;

import com.qdlc.p2p.dal.dto.AdditionalUserCommodity;

/**
 * Created by liaoxiangkai on 2015/12/9.
 */
public class AdditionalUserCommodityModel extends AdditionalUserCommodity{
    //用户名
    private String userName;
    //用户真实姓名
    private String realName;
    //物品名称
    private String commodityName;
    //审核人名字
    private String auditName;
    //发货人名字
    private String postName;
    //搜索框输入字符串
    private String searchName;
    //当前页
    private int page;
    //每页记录数
    private int rows;

    //0:待审核,1:审核通过,-1:审核未通过,2:已发货,3:已收货
    public static final int USER_COMMODITY_AUDIT_WAIT = 0;
    public static final int USER_COMMODITY_AUDIT_PASS = 1;
    public static final int USER_COMMODITY_AUDIT_FAIL = -1;
    public static final int USER_COMMODITY_SENT = 2;
    public static final int USER_COMMODITY_RECEIVE = 3;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getCommodityName() {
        return commodityName;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }

    public String getAuditName() {
        return auditName;
    }

    public void setAuditName(String auditName) {
        this.auditName = auditName;
    }

    public String getPostName() {
        return postName;
    }

    public void setPostName(String postName) {
        this.postName = postName;
    }

    public String getSearchName() {
        return searchName;
    }

    public void setSearchName(String searchName) {
        this.searchName = searchName;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public static AdditionalUserCommodityModel instance(AdditionalUserCommodity additionalUserCommodity) {
        AdditionalUserCommodityModel model = new AdditionalUserCommodityModel();
        BeanUtils.copyProperties(additionalUserCommodity, model);
        return model;
    }

    public static AdditionalUserCommodity prototype(AdditionalUserCommodityModel additionalUserCommodityModel) {
        AdditionalUserCommodity additionalUserCommodity = new AdditionalUserCommodity();
        BeanUtils.copyProperties(additionalUserCommodityModel, additionalUserCommodity);
        return additionalUserCommodity;
    }




}
